package view.orderfood;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JEditorPane;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
/**
 * 添加备注
 * @author 赵红娇
 * view.orderfood
 * @date 2020年8月30日下午5:39:17
 */
public class V_desc extends JFrame {

	private JPanel contentPane;
	private String remark;
	private JEditorPane ep_remark;
	public String getRemark() {
		return remark;
	}

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					V_desc frame = new V_desc();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public V_desc() {
		setTitle("下单备注");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 475, 309);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("菜品备注：");
		lblNewLabel.setFont(new Font("宋体", Font.PLAIN, 16));
		lblNewLabel.setBounds(57, 71, 80, 15);
		contentPane.add(lblNewLabel);
		
		ep_remark = new JEditorPane();
		ep_remark.setBounds(136, 65, 200, 109);
		contentPane.add(ep_remark);
		
		JButton btn_ok = new JButton("确定");
		btn_ok.setIcon(new ImageIcon(V_desc.class.getResource("/images/保存 (1).png")));
		btn_ok.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				remark=ep_remark.getText();
				dispose();
			}
		});
		btn_ok.setBounds(98, 208, 93, 23);
		contentPane.add(btn_ok);
		
		JButton btnNewButton_1 = new JButton("取消");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				ep_remark.setText("");
			}
		});
		btnNewButton_1.setIcon(new ImageIcon(V_desc.class.getResource("/images/delete.png")));
		btnNewButton_1.setBounds(243, 208, 93, 23);
		contentPane.add(btnNewButton_1);
	}
}
